import React from 'react';
var Text = function Text(_ref) {
  var value = _ref.value,
    options = _ref.options;
  var texts = Array.isArray(value) ? value : value !== undefined && value !== null ? [value] : [];
  if (options === null || options === void 0 ? void 0 : options.length) {
    texts = texts.map(function (item) {
      var found = options.find(function (option) {
        return option.value === item;
      });
      return found ? found.label : item;
    });
  }
  return /*#__PURE__*/ React.createElement(
    'span',
    {
      className: 'szzj-form-detail-text',
    },
    Array.isArray(texts) ? texts.join(',') : texts,
  );
};
export default Text;
